package boogui.movie;

public class MovieSQL {

	private String titleSQL = "select distinct title"
			+ " from movies m inner join showing s"
			+ " on m.movno = s.movno where m.isplay ='Y'";
	private String locationSQL = "select distinct location"
			+ " from showing s inner join movies m"
			+ " on s.movno = m.movno inner join cinema c"
			+ " on c.cineno = s.cineno where title = ?";
	private String cinemaSQL = "select distinct cinename, theater"
			+ " from showing s inner join movies m"
			+ " on s.movno = m.movno inner join cinema c"
			+ " on c.cineno = s.cineno" + " where title = ? and location = ?";

	public String getInsertMovieSQL() {
		return insertMovieSQL;
	}

	public void setInsertMovieSQL(String insertMovieSQL) {
		this.insertMovieSQL = insertMovieSQL;
	}

	public String getSelectMovieSQL() {
		return selectMovieSQL;
	}

	public void setSelectMovieSQL(String selectMovieSQL) {
		this.selectMovieSQL = selectMovieSQL;
	}

	public String getDeleteMovieSQL() {
		return deleteMovieSQL;
	}

	public void setDeleteMovieSQL(String deleteMovieSQL) {
		this.deleteMovieSQL = deleteMovieSQL;
	}

	public String getUpdateMovieSQL() {
		return updateMovieSQL;
	}

	public void setUpdateMovieSQL(String updateMovieSQL) {
		this.updateMovieSQL = updateMovieSQL;
	}

	// 영화정보입력
	private String insertMovieSQL = "insert into movies values(movie.nextval, ?, ?, ?,?,?,?,?,?,?,?, to_date(?, 'YYYYMMDD'),?,?)";

	// 회원 정보 조회 (전체)
	private String selectMovieSQL = "select * from movies where title=?";
	// 영화삭제
	private String deleteMovieSQL = "delete movies  where movno = ?";
	// 영화정보 수정
	private String updateMovieSQL = "update movies set title = ?, genre1 = ? , genre2 = ? , director=?, "
			+ "actor1=?, actor2=?, actor3=?,rating=?,synop=?,runningtime=?, "
			+ "playdate = to_date(?, 'YYYYMMDD'),isplay=?,reserverate=? where mvono=?";

	private String inputMoiveSQL = "select director,actor1,actor2,actor3, ";

	public String getTitleSQL() {
		return titleSQL;
	}

	public void setTitleSQL(String titleSQL) {
		this.titleSQL = titleSQL;
	}

	public String getLocationSQL() {
		return locationSQL;
	}

	public void setLocationSQL(String locationSQL) {
		this.locationSQL = locationSQL;
	}

	public String getCinemaSQL() {
		return cinemaSQL;
	}

	public void setCinemaSQL(String cinemaSQL) {
		this.cinemaSQL = cinemaSQL;
	}

	public String getInputMoiveSQL() {
		return inputMoiveSQL;
	}

	public void setInputMoiveSQL(String inputMoiveSQL) {
		this.inputMoiveSQL = inputMoiveSQL;
	}

}
